<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="DiseaseCreateDlg" widgetVar="DiseaseCreateDialog" modal="true" resizable="false" appendToBody="true" header="#{myBundle.CreateDiseaseTitle}">

            <h:form id="DiseaseCreateForm">

                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{diseaseController.selected != null}">

                        <p:outputLabel value="#{myBundle.CreateDiseaseLabel_did}" for="did" />
                        <p:inputText id="did" value="#{diseaseController.selected.did}" title="#{myBundle.CreateDiseaseTitle_did}" required="true" requiredMessage="#{myBundle.CreateDiseaseRequiredMessage_did}"/>

                        <p:outputLabel value="#{myBundle.CreateDiseaseLabel_name}" for="name" />
                        <p:inputText id="name" value="#{diseaseController.selected.name}" title="#{myBundle.CreateDiseaseTitle_name}" />

                        <p:outputLabel value="#{myBundle.CreateDiseaseLabel_description}" for="description" />
                        <p:inputText id="description" value="#{diseaseController.selected.description}" title="#{myBundle.CreateDiseaseTitle_description}" />
                    </p:panelGrid>
                    <p:commandButton actionListener="#{diseaseController.saveNew}" value="#{myBundle.Save}" update="display,:DiseaseListForm:datalist,:growl" oncomplete="handleSubmit(xhr,status,args,DiseaseCreateDialog);"/>
                    <p:commandButton value="#{myBundle.Cancel}" onclick="DiseaseCreateDialog.hide()"/>
                </h:panelGroup>

            </h:form>

        </p:dialog>

    </ui:composition>

</html>
